{extend name="layout_modal" /}
{block name="css"}
<link rel="stylesheet" href="{$statics}plugins/select2/select2.css">
<link href="{$statics}plugins/um/themes/default/css/umeditor.css" type="text/css" rel="stylesheet">
{/block}
{block name="script"}
<script src="{$statics}plugins/select2/select2.full.min.js"></script>
<script type="text/javascript" src="{$statics}plugins/um/third-party/template.min.js"></script>
<script type="text/javascript" charset="utf-8" src="{$statics}plugins/um/umeditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="{$statics}plugins/um/umeditor.min.js"></script>
<script type="text/javascript" src="{$statics}plugins/um/lang/zh-cn/zh-cn.js"></script>
<script type="text/javascript">
    var um = UM.getEditor('myEditor', {initialFrameWidth: null});
</script>
{/block}
{block name="content"}
<!-- Content Header (Page header) -->
<section class="content" style="padding-top:0px;">
    <div class="row">
        <div class="box">
            <!-- /.box-header -->
            <!-- form start -->
            <form role="form" action="{:url('data_update')}">
                <div class="box-body">
                    <div class="form-group">
                        <label>标题</label>
                        <input type="text" class="form-control" placeholder="标题" name="title" value="{$info.title}">
                    </div>
                    <div class="form-group">
                        <label>文章内容</label>
                        <textarea id="myEditor" name="content"
                                  style="width:100%;height:300px;">{$info.content}</textarea>
                    </div>
                    <div class="form-group">
                        <label>海报图片(推荐使用16:11的图片)</label>
                        <div class="input-group input-group-sm">
                            <input type="text" class="form-control" name="cover" id="thumb_text" value="{$info.cover}">
                            <span class="input-group-btn">
                                <input id="thumb" class="upload_picker" type="file" btnTxt="上传图片">
                            </span>
                        </div>
                        <div id="queue_thumb"></div>
                    </div>
                    <div class="form-group">
                        <label>作者</label>
                        <input type="text" class="form-control" placeholder="作者" name="author" value="{$info.author}">
                    </div>
                </div>
                <input type="hidden" value="{$info.id}" name="id">
            </form>
        </div>
    </div>
</section>
<!-- /.content -->
{/block}